Optimal. Leaf size=233 \[ \frac {3 (e+f x) \text {ArcTan}\left (e^{c+d x}\right )}{4 a d}-\frac {3 i f \text {PolyLog}\left (2,-i e^{c+d x}\right )}{8 a d^2}+\frac {3 i f \text {PolyLog}\left (2,i e^{c+d x}\right )}{8 a d^2}+\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}-\frac {i f \tanh (c+d x)}{4 a d^2}+\frac {3 (e+f x) \text {sech}(c+d x) \tanh (c+d x)}{8 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {i f \tanh ^3(c+d x)}{12 a d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {5690, 4270,
4265, 2317, 2438, 5559, 3852} \begin {gather*} \frac {3 (e+f x) \text {ArcTan}\left (e^{c+d x}\right )}{4 a d}-\frac {3 i f \text {Li}_2\left (-i e^{c+d x}\right )}{8 a d^2}+\frac {3 i f \text {Li}_2\left (i e^{c+d x}\right )}{8 a d^2}+\frac {i f \tanh ^3(c+d x)}{12 a d^2}-\frac {i f \tanh (c+d x)}{4 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}+\frac {(e+f x) \tanh (c+d x) \text {sech}^3(c+d x)}{4 a d}+\frac {3 (e+f x) \tanh (c+d x) \text {sech}(c+d x)}{8 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 3852
Rule 4265
Rule 4270
Rule 5559
Rule 5690
Rubi steps
\begin {align*} \int \frac {(e+f x) \text {sech}^3(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i \int (e+f x) \text {sech}^4(c+d x) \tanh (c+d x) \, dx}{a}+\frac {\int (e+f x) \text {sech}^5(c+d x) \, dx}{a}\\ &=\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {3 \int (e+f x) \text {sech}^3(c+d x) \, dx}{4 a}-\frac {(i f) \int \text {sech}^4(c+d x) \, dx}{4 a d}\\ &=\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}+\frac {3 (e+f x) \text {sech}(c+d x) \tanh (c+d x)}{8 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {3 \int (e+f x) \text {sech}(c+d x) \, dx}{8 a}+\frac {f \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \tanh (c+d x)\right )}{4 a d^2}\\ &=\frac {3 (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{4 a d}+\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}-\frac {i f \tanh (c+d x)}{4 a d^2}+\frac {3 (e+f x) \text {sech}(c+d x) \tanh (c+d x)}{8 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {i f \tanh ^3(c+d x)}{12 a d^2}-\frac {(3 i f) \int \log \left (1-i e^{c+d x}\right ) \, dx}{8 a d}+\frac {(3 i f) \int \log \left (1+i e^{c+d x}\right ) \, dx}{8 a d}\\ &=\frac {3 (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{4 a d}+\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}-\frac {i f \tanh (c+d x)}{4 a d^2}+\frac {3 (e+f x) \text {sech}(c+d x) \tanh (c+d x)}{8 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {i f \tanh ^3(c+d x)}{12 a d^2}-\frac {(3 i f) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x}\right )}{8 a d^2}+\frac {(3 i f) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x}\right )}{8 a d^2}\\ &=\frac {3 (e+f x) \tan ^{-1}\left (e^{c+d x}\right )}{4 a d}-\frac {3 i f \text {Li}_2\left (-i e^{c+d x}\right )}{8 a d^2}+\frac {3 i f \text {Li}_2\left (i e^{c+d x}\right )}{8 a d^2}+\frac {3 f \text {sech}(c+d x)}{8 a d^2}+\frac {f \text {sech}^3(c+d x)}{12 a d^2}+\frac {i (e+f x) \text {sech}^4(c+d x)}{4 a d}-\frac {i f \tanh (c+d x)}{4 a d^2}+\frac {3 (e+f x) \text {sech}(c+d x) \tanh (c+d x)}{8 a d}+\frac {(e+f x) \text {sech}^3(c+d x) \tanh (c+d x)}{4 a d}+\frac {i f \tanh ^3(c+d x)}{12 a d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(929\) vs. \(2(233)=466\).
time = 5.02, size = 929, normalized size = 3.99 \begin {gather*} \frac {2 (f+6 i d (e+f x))+\frac {6 i d (e+f x)}{\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2}-9 (c+d x) (c f-d (2 e+f x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2-9 d e \left (c+d x-2 i \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )-i \sinh \left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2+9 c f \left (c+d x-2 i \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )-i \sinh \left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2-9 d e \left (c+d x+2 i \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2+9 c f \left (c+d x+2 i \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2-\frac {9 f \left (-2 (-1)^{3/4} (c+d x)^2+\sqrt {2} \left (2 (-2 i c+\pi -2 i d x) \log \left (1+i e^{-c-d x}\right )+\pi \left (3 c+3 d x-4 \log \left (1+e^{c+d x}\right )+4 \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )\right )-2 \log \left (-\sin \left (\frac {1}{4} (\pi -2 i (c+d x))\right )\right )\right )+4 i \text {PolyLog}\left (2,-i e^{-c-d x}\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2}{2 \sqrt {2}}-\frac {9 f \left (2 \sqrt [4]{-1} (c+d x)^2+\sqrt {2} \left (2 (2 i c+\pi +2 i d x) \log \left (1-i e^{-c-d x}\right )-\pi \left (c+d x-4 \log \left (1+e^{c+d x}\right )+4 \log \left (\cosh \left (\frac {1}{2} (c+d x)\right )\right )+2 \log \left (\sin \left (\frac {1}{4} (\pi +2 i (c+d x))\right )\right )\right )-4 i \text {PolyLog}\left (2,i e^{-c-d x}\right )\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2}{2 \sqrt {2}}-\frac {6 i d (e+f x) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2}{\left (\cosh \left (\frac {1}{2} (c+d x)\right )-i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {4 i f \sinh \left (\frac {1}{2} (c+d x)\right )}{\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )}+\frac {12 i f \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2 \sinh \left (\frac {1}{2} (c+d x)\right )}{\cosh \left (\frac {1}{2} (c+d x)\right )-i \sinh \left (\frac {1}{2} (c+d x)\right )}+28 f \sinh \left (\frac {1}{2} (c+d x)\right ) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )}{48 d^2 (a+i a \sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 444 vs. \(2 (203 ) = 406\).
time = 4.92, size = 445, normalized size = 1.91
method | result | size |
risch | \(\frac {9 d f x \,{\mathrm e}^{5 d x +5 c}+9 d f x \,{\mathrm e}^{d x +c}-18 i d e \,{\mathrm e}^{4 d x +4 c}-4 i f -22 i f \,{\mathrm e}^{2 d x +2 c}+9 f \,{\mathrm e}^{5 d x +5 c}+8 f \,{\mathrm e}^{3 d x +3 c}-f \,{\mathrm e}^{d x +c}+9 d e \,{\mathrm e}^{5 d x +5 c}+9 d e \,{\mathrm e}^{d x +c}-18 i d f x \,{\mathrm e}^{4 d x +4 c}+18 i d e \,{\mathrm e}^{2 d x +2 c}+6 d e \,{\mathrm e}^{3 d x +3 c}+6 d f x \,{\mathrm e}^{3 d x +3 c}-18 i f \,{\mathrm e}^{4 d x +4 c}+18 i d f x \,{\mathrm e}^{2 d x +2 c}}{12 \left ({\mathrm e}^{d x +c}+i\right )^{2} \left ({\mathrm e}^{d x +c}-i\right )^{4} d^{2} a}+\frac {3 i e \ln \left ({\mathrm e}^{d x +c}+i\right )}{8 d a}-\frac {3 i e \ln \left ({\mathrm e}^{d x +c}-i\right )}{8 d a}+\frac {3 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) x}{8 d a}+\frac {3 i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) c}{8 d^{2} a}+\frac {3 i f \polylog \left (2, i {\mathrm e}^{d x +c}\right )}{8 a \,d^{2}}-\frac {3 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{8 d a}-\frac {3 i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{8 d^{2} a}-\frac {3 i f \polylog \left (2, -i {\mathrm e}^{d x +c}\right )}{8 a \,d^{2}}-\frac {3 i f c \ln \left ({\mathrm e}^{d x +c}+i\right )}{8 d^{2} a}+\frac {3 i f c \ln \left ({\mathrm e}^{d x +c}-i\right )}{8 d^{2} a}\) | \(445\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 936 vs. \(2 (201) = 402\).
time = 0.37, size = 936, normalized size = 4.02 \begin {gather*} -\frac {9 \, {\left (-i \, f e^{\left (6 \, d x + 6 \, c\right )} - 2 \, f e^{\left (5 \, d x + 5 \, c\right )} - i \, f e^{\left (4 \, d x + 4 \, c\right )} - 4 \, f e^{\left (3 \, d x + 3 \, c\right )} + i \, f e^{\left (2 \, d x + 2 \, c\right )} - 2 \, f e^{\left (d x + c\right )} + i \, f\right )} {\rm Li}_2\left (i \, e^{\left (d x + c\right )}\right ) + 9 \, {\left (i \, f e^{\left (6 \, d x + 6 \, c\right )} + 2 \, f e^{\left (5 \, d x + 5 \, c\right )} + i \, f e^{\left (4 \, d x + 4 \, c\right )} + 4 \, f e^{\left (3 \, d x + 3 \, c\right )} - i \, f e^{\left (2 \, d x + 2 \, c\right )} + 2 \, f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 18 \, {\left (d f x + d e + f\right )} e^{\left (5 \, d x + 5 \, c\right )} + 36 \, {\left (i \, d f x + i \, d e + i \, f\right )} e^{\left (4 \, d x + 4 \, c\right )} - 4 \, {\left (3 \, d f x + 3 \, d e + 4 \, f\right )} e^{\left (3 \, d x + 3 \, c\right )} + 4 \, {\left (-9 i \, d f x - 9 i \, d e + 11 i \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (9 \, d f x + 9 \, d e - f\right )} e^{\left (d x + c\right )} + 9 \, {\left (-i \, c f + i \, d e + {\left (i \, c f - i \, d e\right )} e^{\left (6 \, d x + 6 \, c\right )} + 2 \, {\left (c f - d e\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (i \, c f - i \, d e\right )} e^{\left (4 \, d x + 4 \, c\right )} + 4 \, {\left (c f - d e\right )} e^{\left (3 \, d x + 3 \, c\right )} + {\left (-i \, c f + i \, d e\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (c f - d e\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + 9 \, {\left (i \, c f - i \, d e + {\left (-i \, c f + i \, d e\right )} e^{\left (6 \, d x + 6 \, c\right )} - 2 \, {\left (c f - d e\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (-i \, c f + i \, d e\right )} e^{\left (4 \, d x + 4 \, c\right )} - 4 \, {\left (c f - d e\right )} e^{\left (3 \, d x + 3 \, c\right )} + {\left (i \, c f - i \, d e\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (c f - d e\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 9 \, {\left (-i \, d f x - i \, c f + {\left (i \, d f x + i \, c f\right )} e^{\left (6 \, d x + 6 \, c\right )} + 2 \, {\left (d f x + c f\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (i \, d f x + i \, c f\right )} e^{\left (4 \, d x + 4 \, c\right )} + 4 \, {\left (d f x + c f\right )} e^{\left (3 \, d x + 3 \, c\right )} + {\left (-i \, d f x - i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 9 \, {\left (i \, d f x + i \, c f + {\left (-i \, d f x - i \, c f\right )} e^{\left (6 \, d x + 6 \, c\right )} - 2 \, {\left (d f x + c f\right )} e^{\left (5 \, d x + 5 \, c\right )} + {\left (-i \, d f x - i \, c f\right )} e^{\left (4 \, d x + 4 \, c\right )} - 4 \, {\left (d f x + c f\right )} e^{\left (3 \, d x + 3 \, c\right )} + {\left (i \, d f x + i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-i \, e^{\left (d x + c\right )} + 1\right ) + 8 i \, f}{24 \, {\left (a d^{2} e^{\left (6 \, d x + 6 \, c\right )} - 2 i \, a d^{2} e^{\left (5 \, d x + 5 \, c\right )} + a d^{2} e^{\left (4 \, d x + 4 \, c\right )} - 4 i \, a d^{2} e^{\left (3 \, d x + 3 \, c\right )} - a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d^{2} e^{\left (d x + c\right )} - a d^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \left (\int \frac {e \operatorname {sech}^{3}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f x \operatorname {sech}^{3}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {e+f\,x}{{\mathrm {cosh}\left (c+d\,x\right )}^3\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________